package baiqitun.stupro.project.service.impl;

import baiqitun.stupro.common.exception.support.ExistedException;
import baiqitun.stupro.common.exception.support.NotFoundException;
import baiqitun.stupro.common.service.EntityChecker;
import baiqitun.stupro.common.workflow.util.RepositoryUtil;
import baiqitun.stupro.common.workflow.util.RuntimeTaskUtil;
import baiqitun.stupro.common.workflow.util.RuntimeUtil;
import baiqitun.stupro.common.workflow.util.TaskUtil;
import baiqitun.stupro.project.service.SysProjectTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author kedaji
 */
public class SysProjectTaskServiceImpl implements SysProjectTaskService, EntityChecker {

    @Autowired
    private RepositoryUtil repositoryUtil;
    @Autowired
    private RuntimeUtil runtimeUtil;
    @Autowired
    private TaskUtil taskUtil;
    @Autowired
    private RuntimeTaskUtil runtimeTaskUtil;

    @Transactional(rollbackFor = Exception.class)
    @Override
    public void saveRoot(String projectId, String taskName, String description, String createBy) {

    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public void saveChild(String parentTaskId, String taskName, String description, String createBy) {

    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public void removeTask(String taskId, String createBy) {

    }

    @Transactional(readOnly = true, rollbackFor = Exception.class)
    @Override
    public void checkNotFound(String id, NotFoundException e) {

    }

    @Transactional(readOnly = true, rollbackFor = Exception.class)
    @Override
    public void checkExisted(String id, ExistedException e) {

    }

    @Transactional(readOnly = true, rollbackFor = Exception.class)
    @Override
    public Object getExistedEntity(String id, NotFoundException e) {
        return null;
    }
}
